 int n=Integer.parseInt(sc.next());
			String[] b= new String[n];
			for (int i = 0; i < n; i++) {
				switch(sc.next()){
				case "c":
					Computer C = new Computer();
					b[i] = C.toString();
					break;
				case "d":
					Double D = new Double(sc.next());
					b[i] = D.toString();
					break;
				case "i":
					Integer I = new Integer(sc.next());
					b[i] = I.toString();
					break;
				case "s":
					String S = new String(sc.next());
					b[i] = S;
					break;
				default:
					b[i] = "null";
					break;
					
				}
			}
			for (int i = n-1; i >= 0; i--) {
				if(!b[i].equals("null"))
					System.out.println(b[i]);
				
			}